

 <%@page import="DAO.*" %>
 <%@page import="DTO.*" %>
 <%@page import="java.util.ArrayList" %>
  <%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="en">
	<head>
				<!-- Make IE8 behave like IE7, necessary for charts -->
		<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
		
		<title>Admin Control Panel</title>
		
		<!-- CSS -->
		<link rel="stylesheet" type="text/css" media="screen" href="css/reset.css" />
		<link rel="stylesheet" type="text/css" media="screen" href="css/main.css" />
		<link rel="stylesheet" type="text/css" media="screen" href="css/custom-theme/jquery-ui-1.8.1.custom.css" />
		
		<!-- IE specific CSS stylesheet -->
		<!--[if IE]>
			<link rel="stylesheet" type="text/css" media="screen" href="css/ie.css" />
		<![endif]-->
		
		<!-- This stylesheet contains advanced CSS3 features that do not validate yet -->
		<link rel="stylesheet" type="text/css" media="screen" href="css/css3.css" />
		<link href="css/test.css" rel="stylesheet" type="text/css">
		
		<!-- JavaScript -->
		<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
		<script type="text/javascript" src="js/jquery-ui.min.js"></script>
		<script type="text/javascript" src="js/jquery.wysiwyg.js"></script>
		<script type="text/javascript" src="js/jquery.rounded.js"></script>
		<script type="text/javascript" src="js/excanvas.js"></script>
		<script type="text/javascript" src="js/jquery.visualize.js"></script>
		<script type="text/javascript" src="js/script.js"></script>
	</head>

	<body>
		<div id="bokeh"><div id="container">
			
			<div id="header">
				<h1 id="logo">Admin Control Panel </h1>
				
				<div id="header_buttons">
					
					<a href="#modal" rel="modal"><img src="images_admin/icons/envelope.png" alt="3 Messages" />3</a>				
					<a href="#modal2" rel="modal">modal box test</a>
					<a href="#">logout</a>
					<a href="#">view website</a>
					
				</div><!-- end #header_buttons -->
				
				<!-- Modal box -->
				<div id="modal">	
					<div class="modalbox">
						<div class="modalhead">
							<img src="images_admin/modaltop.png" alt="Modal arrow" />
							Mailbox
						</div>
						
						<div class="modalcontent">
							<div class="message">
								<div class="author"><a href="#">Teun</a></div>
								<div class="content">This skin can be easily styled!</div>
								<div class="datetime">16-05 - 08:16</div>
							</div>
							
							<div class="message">
								<div class="author"><a href="#">Pieter</a></div>
								<div class="content">It can also be styled very easily.</div>
								<div class="datetime">11-05 - 16:27</div>
							</div>
								
							<div class="message">
								<div class="author"><a href="#">Jane Doe</a></div>
								<div class="content">This template uses a lot of nice CSS3 effects.</div>
								<div class="datetime">10-05 - 18:42</div>
							</div>
						</div>
							
						<div class="modalfoot">
							<img src="images_admin/icons/newmessage.png" alt="New message" /> New message
						</div>
					</div>
				</div>
				
				<!-- Modal box 2 -->
				<div id="modal2">	
					<div class="modalbox">
						<div class="modalhead">
							<img src="images_admin/modaltop.png" alt="Modal arrow" />
							Mailbox 2
						</div>
						
						<div class="modalcontent">
							<div class="message">
								<div class="author"><a href="#">Pieter</a></div>
								<div class="content">It can also be styled very easily.</div>
								<div class="datetime">11-05 - 16:27</div>
							</div>
								
							<div class="message">
								<div class="author"><a href="#">Jane Doe</a></div>
								<div class="content">This template uses a lot of nice CSS3 effects.</div>
								<div class="datetime">10-05 - 18:42</div>
							</div>
						</div>
							
						<div class="modalfoot">
							<img src="images_admin/icons/newmessage.png" alt="New message" /> New message
						</div>
					</div>
				</div>
				
				<!-- Navigation -->
				<ul id="main-nav">
					<li>
						<a href="ad_product.jsp">
							Product
						</a>
					</li>
						
					<li>
						<a href="ad_customer.jsp"><!-- use href="#" to indicate there's a submenu -->
							Customer
						</a>
						
						
					</li>
						
					<li>
						<a href="ad_Order.jsp">
							Order
						</a>
						
						
					</li>
					<li>
						<a href="ad_category.jsp" class="current">
							Category
						</a>
						
						
					</li>
                                       
				</ul><!-- end #nav -->
				
			</div><!-- end #header -->
			
			<div id="content">
			
				<h2><img src="images_admin/icons/tools_32.png" alt="Manage Users" />Manage Category </h2>
				<div class="notification information"> This is an informative notification. Click me to hide me. </div>
				<div class="clear"></div>
                <!-- Start #nav -->
			  <div class="content-box">
                            <div class="content-box-header">
                                    <h3>Tìm kiếm Danh Mục sản phẩm</h3>
                            </div><!-- end .content-box-header -->
                                <form  method="post" action="Servlet_DanhMuc">
                            <div class="content-box-content">
                                <td style="text-align: left">
                                    Tên sản phẩm
                                </td>
                                 <input name="action" value="TimKiemTenSP" type="hidden">
                                <td>
                                    <input name="txtten" id="txtten" type="text">
                                </td>
                                
                              <td><input name="btn_timkiem" value="Tìm kiếm" type="submit"> </td>
                                                            
                            </div>   </form>           
                        </div> 			
				<div class="content-box">
                                    
					<div class="content-box-header">
   
					  <h3>Category</h3>
					  <td>&nbsp;</td>
					  <span style="margin-left:150px"></span>
					  <td>&nbsp;</td>
                                            
                  </div>
                                         
					<div class="content-box-content">
				    <table width="138%" class="pagination" rel="5">
				      <!-- add the class .pagination to dynamically create a working pagination! The rel-attribute will tell how many items there are per page -->
                      <thead>
                        <tr>
                          <th><input name="checkbox" type="checkbox" /></th>
						  <th>ID</th>
						  <th>Name</th>
                          
                          <th>Actions</th>
                        </tr>
                      </thead>
                      <tfoot>
                        <tr>
                          <td colspan="4"><div class="bulk-actions">
                              <select name="select">
                                <option value="option1">Choose an action...</option>
                                <option value="option2">Delete</option>
                                <option value="option3">Move to authors</option>
                              </select>
                          <a href="#" class="graybutton">Apply to selected</a></div></td>
                        </tr>
                      </tfoot>
                       
                      <tbody>
                         <%
                             String tk = (String) request.getSession().getAttribute("timkiem");
                             DanhMuc_DAO spda = new DanhMuc_DAO();
                             ArrayList<DanhMuc_DTO> dssp;
                             if(tk==null)
                             {
                                dssp = spda.DS_DanhMuc();
                             }
                             else
                             {
                                 dssp = spda.TimSPTheoTen(tk);
                                 request.getSession().setAttribute("timkiem", null);
                             }                           
                             for (DanhMuc_DTO sp: dssp){               
          
                        %>      
                        <tr>
                          <td><input name="checkbox2" type="checkbox" /></td>
                          <td><%=sp.getIDDanhMuc()%></td>
                          <td><a href="#"><%=sp.getTenDanhMuc()%></a></td>
                          
                          <td><a href="Servlet_DanhMuc?action=EditDM&ID=<%=sp.getIDDanhMuc()%>"><img src="images_admin/icons/pencil.png" alt="Edit" /></a> <a href="Servlet_DanhMuc?action=XoaSP&ID=<%=sp.getIDDanhMuc()%>" class="confirmation"><img src="images_admin/icons/cross.png" alt="Delete" /></a> </td>
                        </tr>
                         <%}%>
                      </tbody>
                     
                    </table>
			      </div>
					<!-- end .content-box-content -->
					
				</div><!-- end .content-box -->
				<div class="clear"></div>
				
			    <div class="content-box">
				  <div class="content-box-content">
						<div class="content-box">
                          <div class="content-box-header"></div>
				    </div>
						<h1>Chức Năng</h1>
                                                <div class="clear">
												<table>
                                                    <form method="post" action="Servlet_DanhMuc">
                                                    
                                                        <tr>
                                                            <td style="text-align: right">
                                                                
                                                                Tên Danh Mục sản phẩm:
                                                            </td>
                                                            <td>
                                                                <input name="txtTenDanhMuc" id="txtTenDanhMuc" type="text">
                                                            </td>
                                                        </tr
                                                        
                                                        <tr>
                                                            <td style="text-align: right">
                                                                <input type="hidden" name="action" value="ThemSP"/>
                                                                <input name="btnThem" id="btnThem" value="Thêm" type="submit"> 
                                                            </td>
                                                           
                                                            <td>&nbsp;</td>
                                                        </tr>
														 </form>
                                                    </table>
                                                    
                                                </div>
						
				  </div>
			  </div>
							
			</div><!-- end #content -->
			
		</div></div><!-- end #bokeh and #container -->
		
		<div id="footer">
			Admin Control Panel | Designed by <a href="http://www.bramjetten.nl/">Bram Jetten Webdesign</a> 2010
		</div><!-- end #footer -->

	</div>
        


</body>

</html>

